import axios from 'axios';
import MX from '@/utils/myAxios';
const baseUrl = 'http://xawn.f3322.net:8012';

//获取门店信息
export const findAllShopApi = (data) =>
  MX(baseUrl + '/gen/shop/findAll', 'get', data);
//修改门店状态
export const updateStatusApi = (data) => MX(baseUrl + '/gen/shop', 'put', data);
//获取所有商铺的审核数据
export const getApplyApi = (data) => MX(baseUrl + '/gen/apply', 'get', data);
//修改商铺状态
export const updateApplyApi = (data) => MX(baseUrl + '/gen/apply', 'put', data);
//获取所有充电桩的审核数据
export const getChargeApi = (data) =>
  MX(baseUrl + '/gen/apply/charge', 'get', data);
//修改充电桩状态
export const updateChargeApi = (data) =>
  MX(baseUrl + '/gen/apply/charge/', 'put', data);
//新增店铺或充电站
export const addShopApi = (data) =>
  axios.post(baseUrl + '/gen/apply/shop', 'post', data);
//验证商家手机号是否已注册
export const canTelApi = (tel) =>
  axios.get(baseUrl + `/gen/apply/shop/tel/${tel}`);
//查看店铺名是否已注册
export const canShopApi = (shopname) =>
  axios.get(baseUrl + `/gen/apply/shop/shopname/${shopname}`);
